#pragma once


#include <iostream>
#include <string>
#include <ctime>
#include <unistd.h>       
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>



#define INFO    1
#define WARNING 2
#define DEBUG   3
#define FATAL   4

const std::string log_path = "./log/log.txt";


class Log
{
public:

    static void log(std::string level, std::string message, std::string file, int line)
    {
        std::cout << "[" << level << "]" << "[" << time(nullptr) << "[" << message << "]" << "[" << file << "]" << "[" << line << "]" << std::endl;
    }
};





#define LOG(LEVEL, MESSAGE) (Log::log(#LEVEL, MESSAGE, __FILE__, __LINE__))